package com.daiqile.myinterest.adapter;

import android.support.annotation.Nullable;
import android.widget.ImageView;

import com.blankj.utilcode.util.Utils;
import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.daiqile.myinterest.R;
import com.daiqile.myinterest.model.ArticleListDTO;

import java.util.List;

/**
 * @author Mr.Bean
 * @date Created on 2017/12/21.
 */

public class ArticleListAdapter extends BaseQuickAdapter<ArticleListDTO,BaseViewHolder>{
    public ArticleListAdapter( @Nullable List<ArticleListDTO> data) {
        super(R.layout.item_imgtext, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, ArticleListDTO item) {
        Glide.with(mContext).load(item.getImg()).into((ImageView)helper.getView(R.id.item_imgtext_img));
        helper.setText(R.id.item_imgtext_text,item.getTitle());


    }
}
